Recently, a PWM signal has been broadly used in the dimming of backlights for liquid crystal panels or the controlling of the rotation speed of DC motors. For example, in the dimming of backlights for liquid crystal panels, the brightness is adjusted by controlling on time and off time of LED elements. Specifically, as the on time (lighting time) is lengthened, the backlights can be brightened, and as the off time is lengthened, the backlights can be dimmed.
The adjustment of lighting time and off time is controlled by changing the frequency or duty ratio (hereinafter, simply described as the duty) of the PWM signal. For example, the lighting time of the LED elements is lengthened by increasing the duty of the PWM signal, brightening the backlights. On the other hand, the lighting time of the LED elements is shortened (the off time is lengthened) by decreasing the duty of the PWM signal, dimming the backlights.
In case the dimming of the backlights or when the rotation speed of a DC motor is controlled, the on/off state is preferably slowly (smoothly) changed over time. For this purpose, a state value is changed stepwise until the frequency or duty of the PWM signal reaches a target value.
When the frequency or duty of the PWM signal is changed stepwise, appropriate values of the period and the duty are required to be set by a CPU for each step change. However, because the update frequency of the period or duty is high, the load of the CPU is large.